package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.WhiteListMapper;
import com.ruoyi.merchant.domain.WhiteList;
import com.ruoyi.merchant.service.IWhiteListService;
import com.ruoyi.common.core.text.Convert;

/**
 * 白名单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-03
 */
@Service
public class WhiteListServiceImpl implements IWhiteListService 
{
    @Autowired
    private WhiteListMapper whiteListMapper;

    /**
     * 查询白名单
     * 
     * @param id 白名单主键
     * @return 白名单
     */
    @Override
    public WhiteList selectWhiteListById(String id)
    {
        return whiteListMapper.selectWhiteListById(id);
    }

    /**
     * 查询白名单列表
     * 
     * @param whiteList 白名单
     * @return 白名单
     */
    @Override
    public List<WhiteList> selectWhiteListList(WhiteList whiteList)
    {
        return whiteListMapper.selectWhiteListList(whiteList);
    }

    /**
     * 新增白名单
     * 
     * @param whiteList 白名单
     * @return 结果
     */
    @Override
    public int insertWhiteList(WhiteList whiteList)
    {
        return whiteListMapper.insertWhiteList(whiteList);
    }

    /**
     * 修改白名单
     * 
     * @param whiteList 白名单
     * @return 结果
     */
    @Override
    public int updateWhiteList(WhiteList whiteList)
    {
        return whiteListMapper.updateWhiteList(whiteList);
    }

    /**
     * 批量删除白名单
     * 
     * @param ids 需要删除的白名单主键
     * @return 结果
     */
    @Override
    public int deleteWhiteListByIds(String ids)
    {
        return whiteListMapper.deleteWhiteListByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除白名单信息
     * 
     * @param id 白名单主键
     * @return 结果
     */
    @Override
    public int deleteWhiteListById(String id)
    {
        return whiteListMapper.deleteWhiteListById(id);
    }
}
